package com.qmth.gkwb.data.log;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.qmth.gkwb.data.document.Order;
import com.qmth.pay.OrderFormData;

@Aspect
@Component
public class LogAspect {

	private Logger logger;
	
	public LogAspect(){
		logger = LoggerFactory.getLogger(getClass());
	}
	
	/**
	@AfterReturning(pointcut="execution(* com.qmth.gkwb.data.pay..*.*(..))",returning="re")
	public void logServiceAccess(JoinPoint joinPoint,Order re) {
		
		logger.info("创建订单："+re.getExamId()+",订单号："+re.getOrderId()+"，金额："+re.getMoney());
	}
	
	@AfterThrowing(pointcut="execution(* com.qmth.gkwb.data..*.*(..))",throwing="ex")
	public void logError(JoinPoint joinPoint,Exception ex) {
		logger.error(ex.getMessage(),ex);
	}
	 **/
}
